@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="{{URL::asset('js/')}}/kindeditor-4.1.7/themes/default/default.css" />
    <link rel="stylesheet" href="{{URL::asset('js/')}}/kindeditor-4.1.7/plugins/code/prettify.css" />
    <script src="{{URL::asset('js/')}}/kindeditor-4.1.7/kindeditor.js" type="text/javascript"></script>
    <script charset="utf-8" src="{{URL::asset('js/')}}/kindeditor-4.1.7/lang/zh_CN.js"></script>
    <script charset="utf-8" src="{{URL::asset('js/')}}/kindeditor-4.1.7/plugins/code/prettify.js"></script>
    <script type="text/javascript" src="{{URL::asset('js/')}}/ajaxfileupload.js"></script>
    <script type="text/javascript" src="{{URL::asset('js/')}}/common.js"></script>
    <script>
        KindEditor.ready(function(K) {

            var editor1 = K.create('#activity_content,#activity_summary,#activity_remark', {
                uploadJson: "{{url('kindedit/upload')}}",
                fileManagerJson: "{{url('kindedit/manager')}}",
                allowFileManager: true,
                afterBlur: function() {
                    this.sync();
                },
                items: ['source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', 'image', '/', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'table', 'hr', 'emoticons', 'pagebreak', 'anchor', 'link', 'unlink', '|']
            });

        });
    </script>
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i
                            class="icon-home"></i> 首页</a>
                <a href="{{url('news/list')}}" class="tip-bottom">资讯详情</a>
                <a href="#" class="current">资讯详情</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span11">
                    <div class="widget-box">
                        <div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i>
						</span>
                            <h5>资讯编辑</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <form action="{{url('news/edit')}}" method="post" class="form-horizontal">
                                <div class="control-group">
                                    <label class="control-label">ID :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="id" value="{{$list->id}}" readonly="readonly"  />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">标题 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="title" value="{{$list->title}}" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">主题 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="subject" value="{{$list->subject}}" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">描述 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="description" value="{{$list->description}}" readonly="readonly"/>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">前台是否可见 :</label>
                                    <div class="controls">
                                        <input type="radio"  name="status"  value="1" @if($list->status==1)checked="checked"@endif readonly="readonly"/>可见
                                        <input type="radio"  name="status"  value="0" @if($list->status==0)checked="checked"@endif readonly="readonly"/>不可见
                                    </div>
                                </div>

                                <div class="control-group">
                                    <label class="control-label">所属分类 :</label>
                                    <div class="controls">
                                        <select name="category_id" readonly="readonly">
                                            <option value="">请选择</option>
                                            @foreach($cats as $category)
                                                <option value="{{$category->id}}"@if($category->id==$list->category_id)selected="selected"@endif>{{$category->name}}</option>
                                            @endforeach
                                        </select>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">来源 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="source" value="{{$list->source}}" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">来源url :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="source_url" value="{{$list->source_url}}" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">版权 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="copyrights" value="{{$list->copyrights}}" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">关键词 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="keyword" value="{{$list->keyword}}"  readonly="readonly" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">内容 :</label>
                                    <div class="controls">
                                        <textarea id="activity_content" name="content" style="width: 450px; height: 240px;" readonly="readonly" >{{$list->content}}</textarea>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">缩略图 :</label>
                                    <div class="controls">
                                        <input type="text" class="span11" name="thumb" value="{{$list->thumb}}" placeholder="缩略图" readonly="readonly" />
                                        <a href="javascript:void(0);" id="uploadBgimgBtn" class="icon-picture"  onclick="javascript:openBrowse('uploadBgimgBtn','uploadBgimg');"></a>
                                        <input type="file" id="uploadBgimg" style="display:none" name="myfile" size="10" onchange="fileUpload('uploadBgimg','thumb')"/>
                                    </div>
                                </div>
                                <input type="hidden" class="span11" name="formType" value="edit" />
                            </form>
                            <a href="{{url('news/edit?id='.$list->id)}}" target="_blank"><button class="btn btn-success">编辑</button></a>

                            @include('errors.list')
                            @include('message.flash')
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@stop
